How can I get the column index in each row when the value is 1 in python

welcome to shbcf.ru